﻿using System.Runtime.Serialization;
using System.ServiceModel;
using System.Drawing;

namespace Nasa8x.Web.UI
{
    [ServiceContract(SessionMode = SessionMode.Required)]
    public interface ICaptchaService
    {
        [OperationContract]
        bool IsValidCaptcha(string captcha, string captchaHash);

        [OperationContract]
        Message GetRandomAntiBotImage();
    }

    [DataContract]
    public class Message
    {
        [DataMember]
        public string CaptchaHash { get; set; }

        [DataMember]
        public Bitmap CaptchaImage { get; set; }
    }
}
